package com.cts.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cts.entity.Blog;
import com.cts.model.dto.BlogListDTO;
import com.cts.model.vo.*;

import java.util.List;
import java.util.Map;

/**
* @author tongshengchen
* @description 针对表【blog】的数据库操作Service
* @createDate 2023-02-06 18:30:39
*/
public interface BlogService extends IService<Blog> {

    Blog setBlogDefault(Blog blog);

    PageResultVO<Blog> getBlogList(BlogListDTO blogListDTO);


    Boolean publishBlog(Integer id, Boolean isPublished);

    Boolean topBlog(Integer id, Boolean isTop);

    void privateVisible(Long id);

    void updateVisible(Blog blog);

    List<RandomBlogVO> getRandomBlogs();

    PageResultVO<BlogInfoVO> getBlogs(String type, String value, Integer pageNo, Integer pageSize);

    Blog getBlogDetail(Long id);

    Map<String, Object> getBlogTimeLine();
}
